<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>检查结果</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui/themes/default/easyui.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/page/weixin/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/common/common.js"></script>
</head>
<body>
<div style="padding-left: 25%;padding-top: 55%;">
<form id="frmQuestionnaireFile" method="post" enctype="multipart/form-data">
	<input type="hidden" name="diagnosisId" value="${diagnosisId }">
	<input type="hidden" name="openid" value="${openid }">
	<input name="files" class="easyui-filebox"  data-options="buttonText:'选择文件'" style="width: 60%;"><br/>
	<br/>
	<br/>
	<br/>
	<a id="btn" href="#" class="easyui-linkbutton" onclick="submitFrm()" style="width: 60%;">提交</a> 
	
</form>
</div>



<script type="text/javascript">

wx.config({
    debug: false, 
    appId: '${appId}', 
    timestamp: '${timestamp}', 
    nonceStr: '${nonceStr}', 
    signature: '${signature}',
    jsApiList: ['closeWindow'] 
});

//提交表单
function submitFrm()
{
	kuanrf.common.loading();
	$('#frmQuestionnaireFile').form('submit', {    
	    url:"${pageContext.request.contextPath}/weixin/qusetionnaire/answer/file/add",
	    success:function(dataStr){  
	    	var data=JSON.parse(dataStr);
	    	if(data.result==true)
        	{
	    		alert("您的检查结果已成功提交给医生！");
        		wx.closeWindow();
        	}  
	    	else
	    	{
				alert(data.msg);	    		
	    	}
	    }    
	});  
}


</script>
</body>
</html>